package builder;

/**
 * @ClassName BuilderpatternDemo
 * @Description
 * @Author yuhang11
 * @Date 2021/12/29 8:53 下午
 * @Version 1.0
 */
public class BuilderpatternDemo {
    public static void main(String[] args) {
        MealBuilder mealBuilder = new MealBuilder();
        Meal vegMeal = mealBuilder.prepareVegMeal();
        System.out.println("Veg Meal");
        vegMeal.showItems();
        System.out.println("Total cost:" + vegMeal.getCost());

        Meal nonVegMeal = mealBuilder.prepareNonVegMeal();
        System.out.println("\n \n Non-Veg Meal");
        nonVegMeal.showItems();
        System.out.println("Total cost:" +nonVegMeal.getCost());
    }
}
